<%@ page pageEncoding="UTF-8"%>
<%@ taglib prefix="jca" uri="http://www.ptc.com/windchill/taglib/components"%>
<%@ include file="/netmarkets/jsp/components/beginWizard.jspf" %>
<%@ include file="/netmarkets/jsp/components/includeWizBean.jspf" %>
<%@ taglib uri="http://www.ptc.com/windchill/taglib/fmt" prefix="fmt"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()  + path + "/";
%>
<fmt:setBundle basename="ext.huaqin.generic.resource.BizObjectResource" />
<fmt:message var="HQ_CUSTOMER_SEACH" key="HQ_CUSTOMER_SEACH" />

<jca:wizard title="${HQ_CUSTOMER_SEACH}" buttonList="DefaultWizardButtonsNoApply">	
	<jca:wizardStep action="searchRawMaterialStep" type="bizObject" />
</jca:wizard> 

<head>
</head>

<script language="javascript">
	wizardSteps['bizObject.searchRawMaterialStep'].afterJS = function(wizardAction) {
		if("SUBMIT" == wizardAction ){
			var table = PTC.jca.table.Utils.getTable("ext.tianma.part.RawMaterial.builder.SearchRawMaterialTableBuilder");
			var allSelection = table.getSelectionModel().getSelections();
			if(allSelection.length==0){
				JCAAlert('com.ptc.core.agreements.agreementsResource.NOTHING_SELECTED');
				return false;
			}
			var materialType = allSelection[0].get('MaterialType');
			var releaseSite = allSelection[0].get('releaseSite');
			var parentMaterialType = window.opener.document.getElementById("MaterialType");
			var parentReleaseSite = window.opener.document.getElementById("releaseSite");
			parentMaterialType.value = materialType;
			parentReleaseSite.value = releaseSite;
			window.close();
		}
	}
</script>



<%@include file="/netmarkets/jsp/util/end.jspf"%>